import request from '@/utils/request'
// 渲染获取-角色列表
export const getPeopleAPI = (params) => {
  return request({
    url: '/sys/role',
    params: params
  })
}
// 删除
export function deleteRoleApi(id) {
  return request({
    url: `/sys/role/${id}`,
    method: 'delete'
  })
}
// 新增
export const addPeopleAPI = data => {
  return request({
    url: '/sys/role',
    method: 'post',
    data: data
  })
}
// 获取单个角色
export function getOneAPI(data) {
  return request({
    url: `/sys/role/${data}`
  })
}
// 编辑角色
export function updateRoleApi(data) {
  return request({
    method: 'put',
    url: `/sys/role/${data.id}`,
    data
  })
}
